Skip to content

Instantly share code, notes, and snippets.

Created April 10, 2017 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/cab3db786a975e39afaf07e6d3b0294e to your computer and use it in GitHub Desktop.
Save anonymous/cab3db786a975e39afaf07e6d3b0294e to your computer and use it in GitHub Desktop.
mesabuild
#!/bin/bash
clear;
echo "Lets see if we can make setting mesa outputs a little easier."
echo "With this tool we will;"
echo "Choose the mesa card we are working with, set our default values;"
echo "We will select the pin and whether or not it shall be inverted;"
echo "Please select a mesa card to work with, type the coresponding number and press ENTER"
sleep .1
echo "1. 7i80 (eth) try me try me (im broke too but things are coming along)"
sleep .1
echo "2. 7i90 (epp)notrdy"
sleep .1
echo "3. 7i92 (eth)notrdy"
sleep .1
echo "4. 5i25 (pci)notrdy"
read ans
if [ $ans = '1' ]; then
echo "net hm2_7i80.0.gpio."
echo "Which physical pin are we working with? example '024' "
read pin
echo "net hm2_7i80.0.gpio."$pin
echo "what is it connected to?"
read signal
echo ""
echo ""
echo ""
echo "net hm2_7i80.0.gpio."$pin'.out'' <= '$signal
echo "setp hm2_7i80.0.gpio."$pin".invert_output true"
echo "setp_hm2_7i80.0.gpio."$pin".is_output true"
echo ""
echo ""
echo ""
fi
exit;
if [ $ans = '2' ]; then
echo "net hm2_7i90.0.gpio."
fi
if [ $ans = '3' ]; then
echo "net hm2_7i92.0.gpio."
fi
if [ $ans = '4' ]; then
echo "net hm2_7i92.0.gpio."
fi
if [ $ans = '5' ]; then
fi
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment